package org.finesys.common.security.authorization;

import org.finesys.common.security.authentication.handler.AuthAuthenticationFailureHandler;
import org.springframework.security.config.Customizer;
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2ClientAuthenticationConfigurer;


public class OAuth2ClientAuthenticationConfigurerCusomizer implements Customizer<OAuth2ClientAuthenticationConfigurer> {

    @Override
    public void customize(OAuth2ClientAuthenticationConfigurer oAuth2ClientAuthenticationConfigurer) {
        //登录失败处理
        oAuth2ClientAuthenticationConfigurer.errorResponseHandler(new AuthAuthenticationFailureHandler());
    }
}
